package java8_20;

/**
 * @author oldliu
 * @since 1.0
 */
//教务处
public class Jiaowuchu {
    String name;

    public int calc(int s1java,int s2h5){
        if(s1java<=60)
            s1java+=20;
        System.out.println("在计算的方法里，java成绩是："+s1java+",h5成绩是："+s2h5);
        return (s1java+s2h5)/2;
    }

    //算平均成绩
    public int calc2(Student s){
        s.htmlScore+=10;
        s.javaScore+=10;
        System.out.println("在教务处的方法中：");
        s.show();
        return (s.htmlScore+s.javaScore)/2;
    }
    //计算多个学生的java成绩平均分
    public int calc3(Student[] s){
        int sum=0;
        for(Student x:s){
            sum+=x.javaScore;
        }
        return sum/s.length;
    }
}
